<template>
  <div class="container">
    <div>
      <p class="title">
        <span style="color: #fff"> 安徽省特种设备检测院电子评分系统 </span>
      </p>
      <div class="table_container">
        <div class="main-title">
          <img src="@/assets/urban-development-indicators/icon.png" alt="" />
          <div class="text">安全阀校验人员实际操作考试总成绩表</div>
        </div>
        <table
          cellspacing="0"
          cellpadding="0"
          style="
            table-layout: fixed;
            width: 100%;
            border-collapse: collapse;
            margin: 0 auto;
          "
        >
          <tr style="height: 22.7pt">
            <td colspan="2" style="width: 76.2pt">
              <p class="label">
                <span class="labelFont">考号</span>
              </p>
            </td>
            <td colspan="2" style="width: 207.7pt">
              <p class="label">
                <span style="font-family: 宋体; font-size: 10.5pt">{{
                  examCandidate.number
                }}</span>
              </p>
            </td>
            <td rowspan="4" style="width: 62pt">
              <p class="label">
                <span class="labelFont">总得分</span>
              </p>
            </td>
            <td colspan="2" rowspan="4" style="width: 97.65pt">
              <p class="label">
                <span class="labelFont">{{ sum }}</span>
              </p>
            </td>
          </tr>
          <tr style="height: 22.7pt">
            <td colspan="2" style="width: 76.2pt">
              <p class="label">
                <span class="labelFont">姓名</span>
              </p>
            </td>
            <td colspan="2" style="width: 207.7pt">
              <p class="label">
                <span style="font-family: 宋体; font-size: 10.5pt">{{
                  examCandidate.name
                }}</span>
              </p>
            </td>
          </tr>
          <tr style="height: 22.7pt">
            <td colspan="2" style="width: 76.2pt">
              <p class="label">
                <span class="labelFont">身份证号</span>
              </p>
            </td>
            <td colspan="2" style="width: 207.7pt">
              <p class="label">
                <span style="font-family: 宋体; font-size: 10.5pt">{{
                  examCandidate.sfzNumber
                }}</span>
              </p>
            </td>
          </tr>
          <tr style="height: 22.7pt">
            <td colspan="2" style="width: 76.2pt">
              <p class="label">
                <span style="font-family: 宋体; font-size: 10.5pt"
                  >考试批次</span
                >
              </p>
            </td>
            <td colspan="2" style="width: 207.7pt">
              <p class="label">
                <span
                  style="
                    font-family: 宋体;
                    font-size: 10.5pt;
                    font-style: normal;
                    text-decoration: none;
                  "
                  >{{ examCandidate.batchNumber }}</span
                >
              </p>
            </td>
          </tr>
          <tr class="trZdy1">
            <td style="width: 21.45pt">
              <p class="label">
                <span class="labelFont">序号</span>
              </p>
            </td>
            <td style="width: 43.95pt">
              <p class="label">
                <span class="labelFont">考试要求</span>
              </p>
            </td>
            <td style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">考试内容</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">考试要点</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">配分</span>
              </p>
            </td>
            <td style="width: 43.9pt">
              <p class="label">
                <span class="labelFont">扣分</span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td rowspan="12" style="width: 21.45pt">
              <p class="label">
                <span class="labelFont">1</span>
              </p>
              <p class="label">
                <span class="labelFont">&#xa0;</span>
              </p>
            </td>
            <td rowspan="12" style="width: 43.95pt">
              <p class="label">
                <span class="labelFont">在线</span>
              </p>
              <p class="label">
                <span class="labelFont">校验</span>
              </p>
            </td>
            <td style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">校验任务确认</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">校验项目内容</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="oneScore"
                  />
                </span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td rowspan="2" style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">校验安全确认及校验前检查</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">校验安全确认</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="twoScore"
                  />
                </span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">外观检查</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="threeScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td rowspan="3" style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">在线校验装置连接调试</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">校验装置的结构及要求</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="fourScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">框架式在线校验装置主要部件</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="fiveScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">在线校验装置判开过程</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="sixScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td rowspan="3" style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">整定压力试验和调整</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">安全阀有效密封直径</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="sevenScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">进行整定压力试验和调整步骤</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="eightScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">在线校验</span
                ><span class="labelFont">准确度主要影响因素</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="nineScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td rowspan="3" style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">现场实际操作及校验记录填写</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">现场实际操作</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="4" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>4)value=4"
                    v-model="tenScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">校验记录（</span
                ><span class="labelFont">在</span
                ><span class="labelFont">线校验）</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="4" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>4)value=4"
                    v-model="elevenScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">校验报告（</span
                ><span class="labelFont">在</span
                ><span class="labelFont">线校验）</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="4" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>4)value=4"
                    v-model="twelveScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td rowspan="8" style="width: 21.45pt">
              <p class="label">
                <span class="labelFont">2</span>
              </p>
            </td>
            <td rowspan="8" style="width: 43.95pt">
              <p class="label">
                <span class="labelFont">修理</span>
              </p>
            </td>
            <td style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">拆卸、检查和重新组成</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">拆卸安全阀零部件名称</span>
              </p>
              <p class="label">
                <span class="labelFont">及检查要点</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="thirteenScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">故障分析</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">常见故障分析</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="fourteenScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">故障部件修复</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">故障部件修复</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="fifteenScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td rowspan="3" style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">密封面研磨</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">研磨原理</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="sixteenScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">研磨方式及工艺</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="seventeenScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">研磨注意事项</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="eighteenScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td rowspan="2" style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">现场实际操作及修理记录</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">现场实际操作</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="4" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>4)value=4"
                    v-model="nineteenScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">修理记录</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="4" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>4)value=4"
                    v-model="twentyScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td rowspan="8" style="width: 21.45pt">
              <p class="label">
                <span class="labelFont">3</span>
              </p>
            </td>
            <td rowspan="8" style="width: 43.95pt">
              <p class="label">
                <span class="labelFont">离线</span>
              </p>
              <p class="label">
                <span class="labelFont">校验</span>
              </p>
            </td>
            <td style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">校验任务确认</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">校验项目内容</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="2" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>2)value=2"
                    v-model="twentyOneScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td rowspan="2" style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">校验安全确认及校验前检查</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">校验安全确认及检查内容</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="4" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>4)value=4"
                    v-model="twentyTwoScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">校验介质要求及专用仪表要求</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="4" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>4)value=4"
                    v-model="twentyThreeScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">整定压力试验与调整</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">整定压力试验要求及操作步骤</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="4" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>4)value=4"
                    v-model="twentyFourScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">密封试验</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">密封试验要求及操作步骤</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="4" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>4)value=4"
                    v-model="twentyFiveScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td rowspan="3" style="width: 134.9pt">
              <p class="label">
                <span class="labelFont">现场实际操作及校验记录填写</span>
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">现场实际操作</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="4" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>4)value=4"
                    v-model="twentySixScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">校验记录</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="4" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>4)value=4"
                    v-model="twentySevenScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 14.15pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">校验报告</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="4" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>4)value=4"
                    v-model="twentyEightScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 28.35pt">
            <td rowspan="2" style="width: 21.45pt">
              <p class="label">
                <span class="labelFont">4</span>
              </p>
            </td>
            <td rowspan="2" style="width: 43.95pt">
              <p class="label">
                <span class="labelFont">安全阀校验操作工艺编制</span>
              </p>
            </td>
            <td rowspan="2" style="width: 134.9pt">
              <p class="label">
                <span class="labelFont"
                  >校验准备与校验前检查、校验和密封试验操作步骤、判断合格的标准、</span
                >
              </p>
            </td>
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">操作工艺编制（在线校验）</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="10" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>10)value=10"
                    v-model="twentyNineScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 28.35pt">
            <td colspan="2" style="width: 134.8pt">
              <p class="label">
                <span class="labelFont">操作工艺编制（离线校验）</span>
              </p>
            </td>
            <td style="width: 42.95pt">
              <p class="label">
                <span class="labelFont">
                  <input id="input" readonly type="number" value="10" />
                </span>
              </p>
            </td>
            <td style="vertical-align: top; width: 43.9pt">
              <p class="label">
                <span class="labelFont">
                  <input
                    type="text"
                    oninput="if(value<0)value=0;if(value>10)value=10"
                    v-model="thirtyScore"
                /></span>
              </p>
            </td>
          </tr>
          <tr style="height: 26.45pt">
            <td colspan="2" style="width: 76.2pt">
              <p class="label">
                <span class="labelFont">现场考评人员</span>
              </p>
            </td>
            <td colspan="5" style="width: 388.95pt">
              <p style="line-height: 12pt; margin: 0pt; orphans: 0; widows: 0">
                <Upload @clickUpload="clickUpload"></Upload>
                <span class="labelFont">{{ currentDate }}</span>
              </p>
            </td>
          </tr>
          <tr style="height: 0pt">
            <td style="width: 32.25pt; border: none"></td>
            <td style="width: 54.75pt; border: none"></td>
            <td style="width: 145.7pt; border: none"></td>
            <td style="width: 72.8pt; border: none"></td>
            <td style="width: 72.8pt; border: none"></td>
            <td style="width: 53.75pt; border: none"></td>
            <td style="width: 54.7pt; border: none"></td>
          </tr>
        </table>
      </div>
      <div class="tips">
        <div>
          <p
            style="
              margin: 0pt;
              orphans: 0;
              text-align: justify;
              text-indent: 0pt;
              widows: 0;
            "
          >
            <span class="labelFont">1、</span
            ><span class="labelFont"
              >实操考试采用现场实际操作和演示操作相结合的方式</span
            ><span class="labelFont">。</span>
          </p>
          <p
            style="
              margin: 0pt;
              orphans: 0;
              text-align: justify;
              text-indent: 0pt;
              widows: 0;
            "
          >
            <span class="labelFont">2、</span
            ><span class="labelFont"
              >实操考试满分为100分，合计得分达70分，判定为“合格”。</span
            >
          </p>
          <p style="margin: 0pt; orphans: 0; text-align: justify; widows: 0">
            <span class="labelFont">3、</span
            ><span class="labelFont"
              >违反考场纪律和违反安全操作规程者，终止考试，成绩记零分。</span
            >
          </p>
        </div>
      </div>
      <button class="submitBtn" @click="updateRecord">提交</button>
    </div>
    <div style="display: none">
      <video ref="video" autoplay></video>
      <button @click="takePhoto">拍照</button>
      <canvas ref="canvas" style="display: none"></canvas>
    </div>
  </div>
</template>

<script>
import { getCurrentDate, updateCurrentTime } from "../../utils/getTime";
import vueEsign from "../../components/VueEsign.vue";
import Checked from "../../components/checked.vue";
import Upload from "../../components/upload.vue";
import MessageBox from "../../components/messageBox.vue";
import $api from "../../utils/api";
export default {
  name: "",
  components: {
    vueEsign,
    Checked,
    Upload,
    MessageBox,
  },
  data() {
    return {
      stream: null,
      imgSrc: "",
      uploadFlag: false,
      // 考生个人信息
      examCandidate: "",
      // 考试所有题目
      question: "",
      // 考试科目信息
      examRecord: "",
      // 考试题目标题
      questionTypeNameArr: [],
      // 考试题目分类
      questionArr1: [],
      questionArr2: [],
      questionArr3: [],
      questionArr4: [],
      //得分
      oneScore: "",
      twoScore: "",
      threeScore: "",
      fourScore: "",
      fiveScore: "",
      sixScore: "",
      sevenScore: "",
      eightScore: "",
      nineScore: "",
      tenScore: "",
      elevenScore: "",
      twelveScore: "",
      thirteenScore: "",
      fourteenScore: "",
      fifteenScore: "",
      sixteenScore: "",
      seventeenScore: "",
      eighteenScore: "",
      nineteenScore: "",
      twentyScore: "",
      twentyOneScore: "",
      twentyTwoScore: "",
      twentyThreeScore: "",
      twentyFourScore: "",
      twentyFiveScore: "",
      twentySixScore: "",
      twentySevenScore: "",
      twentyEightScore: "",
      twentyNineScore: "",
      thirtyScore: "",
      recordId: "",
      workType: "",
    };
  },
  watch: {
    oneScore(o, n) {
      this.takePhoto(1);
    },
    fifteenScore(o, n) {
      this.takePhoto(2);
    },
  },
  computed: {
    sum() {
      // 使用 Number 函数确保结果为数字类型
      let result =
        100 -
        (Number(this.oneScore) +
          Number(this.twoScore) +
          Number(this.threeScore) +
          Number(this.fourScore) +
          Number(this.fiveScore) +
          Number(this.sixScore) +
          Number(this.sevenScore) +
          Number(this.eightScore) +
          Number(this.nineScore) +
          Number(this.tenScore) +
          Number(this.elevenScore) +
          Number(this.twelveScore) +
          Number(this.thirteenScore) +
          Number(this.fourteenScore) +
          Number(this.fifteenScore) +
          Number(this.sixteenScore) +
          Number(this.seventeenScore) +
          Number(this.eighteenScore) +
          Number(this.nineteenScore) +
          Number(this.twentyScore) +
          Number(this.twentyOneScore) +
          Number(this.twentyTwoScore) +
          Number(this.twentyThreeScore) +
          Number(this.twentyFourScore) +
          Number(this.twentyFiveScore) +
          Number(this.twentySixScore) +
          Number(this.twentySevenScore) +
          Number(this.twentyEightScore) +
          Number(this.twentyNineScore) +
          Number(this.thirtyScore));
      return result;
    },
  },
  created() {
    // 清空缓存imgUrl2
    localStorage.removeItem("imgUrl2");
    this.userInfo = JSON.parse(localStorage.getItem("data"));
    this.recordId = this.userInfo.examRecord.id;
    this.workType = this.userInfo.examRecord.workType;
    this.examCandidate = this.userInfo.examCandidate;
    this.question = this.userInfo.question;
    this.examRecord = this.userInfo.examRecord;
    // this.questionType(this.userInfo.question);
    this.currentDate = getCurrentDate(); // 默认格式 'YYYY-MM-DD'
    this.openCamera();
  },
  methods: {
    async openCamera() {
      try {
        this.stream = await navigator.mediaDevices.getUserMedia({
          video: true,
        });
        this.$refs.video.srcObject = this.stream;
      } catch (error) {
        console.error("无法打开摄像头", error);
      }
    },
    takePhoto(times) {
      const video = this.$refs.video;
      const canvas = this.$refs.canvas;
      canvas.width = video.videoWidth;
      canvas.height = video.videoHeight;
      canvas.getContext("2d").drawImage(video, 0, 0);
      this.imgSrc = canvas.toDataURL("image/png");
      switch (times) {
        case 1:
          localStorage.setItem("examinerImg1", this.imgSrc);
          break;
        case 2:
          localStorage.setItem("examinerImg2", this.imgSrc);
          break;
        case 3:
          localStorage.setItem("examinerImg3", this.imgSrc);
          break;
      }
    },
    clickUpload(e) {
      this.uploadFlag = e;
      this.takePhoto(3);
    },
    questionType(question) {
      // 获取考试题目标题和题目
      let questionTypeNameArr = [];
      question.forEach((item) => {
        if (questionTypeNameArr.indexOf(item.questionTypeName) == "-1") {
          questionTypeNameArr.push(item.questionTypeName);
        }
      });
      this.questionTypeNameArr = questionTypeNameArr;

      let questionArr1 = [];
      let questionArr2 = [];
      let questionArr3 = [];
      let questionArr4 = [];
      question.forEach((item) => {
        if (item.questionTypeName == questionTypeNameArr[0]) {
          questionArr1.push(item);
        }
        if (item.questionTypeName == questionTypeNameArr[1]) {
          questionArr2.push(item);
        }
        if (item.questionTypeName == questionTypeNameArr[2]) {
          questionArr3.push(item);
        }
        if (item.questionTypeName == questionTypeNameArr[3]) {
          questionArr4.push(item);
        }
      });
      this.questionArr1 = questionArr1;
      this.questionArr2 = questionArr2;
      this.questionArr3 = questionArr3;
      this.questionArr4 = questionArr4;
    },
    updateRecord() {
      let examRecord = this.examRecord;
      let examinerImg1 = localStorage.getItem("examinerImg1");
      let examinerImg2 = localStorage.getItem("examinerImg2");
      let examinerImg3 = localStorage.getItem("examinerImg3");
      if (examRecord && examRecord.status !== "2") {
        if (
          localStorage.getItem("imgUrl1") &&
          localStorage.getItem("imgUrl2") &&
          this.uploadFlag
        ) {
          examRecord.assessor1 = localStorage.getItem("imgUrl1");
          examRecord.assessor2 = localStorage.getItem("imgUrl2");
        } else {
          this.$alert("请上传签名", "提示", {
            confirmButtonText: "确定",
            callback: (action) => {},
          });
          return;
        }
      }
      let dataInfo = {
        examinerImg1: examinerImg1,
        examinerImg2: examinerImg2,
        examinerImg3: examinerImg3,
        number: this.examCandidate.number,
        candidateName: this.examCandidate.name,
        sfzNumber: this.examCandidate.sfzNumber,
        batchName: this.examCandidate.batchNumber,
        score: this.sum,
        assessor1: examRecord.assessor1,
        assessor2: examRecord.assessor2,
        examDate: getCurrentDate(),
        workType: this.workType,
        id: this.recordId,
        status: "1",
        recordStr: "",
      };

      let dataJson = {
        oneScore: this.oneScore,
        twoScore: this.twoScore,
        threeScore: this.threeScore,
        fourScore: this.fourScore,
        fiveScore: this.fiveScore,
        sixScore: this.sixScore,
        sevenScore: this.sevenScore,
        eightScore: this.eightScore,
        nineScore: this.nineScore,
        tenScore: this.tenScore,
        elevenScore: this.elevenScore,
        twelveScore: this.twelveScore,
        thirteenScore: this.thirteenScore,
        fourteenScore: this.fourteenScore,
        fifteenScore: this.fifteenScore,
        sixteenScore: this.sixteenScore,
        seventeenScore: this.seventeenScore,
        eighteenScore: this.eighteenScore,
        nineteenScore: this.nineteenScore,
        twentyScore: this.twentyScore,
        twentyOneScore: this.twentyOneScore,
        twentyTwoScore: this.twentyTwoScore,
        twentyThreeScore: this.twentyThreeScore,
        twentyFourScore: this.twentyFourScore,
        twentyFiveScore: this.twentyFiveScore,
        twentySixScore: this.twentySixScore,
        twentySevenScore: this.twentySevenScore,
        twentyEightScore: this.twentyEightScore,
        twentyNineScore: this.twentyNineScore,
        thirtyScore: this.thirtyScore,
      };
      dataInfo.recordStr = JSON.stringify(dataJson);
      $api.updateRecord(dataInfo).then((res) => {
        if (res.data.code == "200") {
          this.$message({
            type: "success",
            message: "提交成功!",
          });
          this.$router.push({
            name: "home",
          });
        }
      });
    },
  },
};
</script>

<style lang="less" scoped>
@import "./css/index.less";
.container {
  text-align: center;
  padding: 12px;
  // 标题
  .title {
    margin: 50px 0 45px 0;
    text-align: left;
    span {
      font-family: 宋体;
      font-size: 28px;
      font-weight: bold;
    }
  }
  // 表格内容
  .table_container {
    text-align: center;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 18px;
    tr {
      height: 25.5pt;
      td {
        border: 1px solid #ccc;
        padding: 6px;
        vertical-align: middle;
        width: 73.75pt;
      }
    }
    .label {
      margin: 0pt;
      orphans: 0;
      text-align: center;
      widows: 0;
    }
    .labelFont {
      font-family: 宋体;
      font-size: 12px;
    }
    .trZdy1 {
      background-color: #f0f0f0;
      font-weight: bold;
      height: 5.7pt;
    }
  }
  .submitBtn {
    width: 12.5rem;
    height: 2.1875rem;
    margin: 24px auto 24px;
    border-radius: 6px;
    background: #409eff;
    color: #ffff;
    border: none;
  }
  .tips {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}
.el-dialog__headerbtn .el-dialog__close {
  display: none;
}
input {
  height: 30px !important;
  text-align: center;
}
td p {
  margin: 1px !important;
}
</style>
